package com.ecactus.spinners;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.AppCompatSpinner;

import android.os.Bundle;
import android.widget.ArrayAdapter;

public class ninePatchSpinnerActivity extends AppCompatActivity {

    private AppCompatSpinner spinner;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_nine_patch_spinner);

        spinner = findViewById(R.id.anps_spinner);
        String[] languages = getResources().getStringArray(R.array.languages);
        ArrayAdapter<String> adapter = new ArrayAdapter<>(this, R.layout.simple_spinner_nine_item,languages);
        adapter.setDropDownViewResource(R.layout.simple_spinner_dropdown_nine_item);
        spinner.setAdapter(adapter);


    }
}